<?php
/**
 * Form definition
 *
 * @category Forms
 * @package Front_Base
 * @subpackage Form
 * @author Christian Soronellas <csoronellas@emagister.com>
 */

/**
 * An "horizontal" Twitter Bootstrap's UI form
 *
 * @category Forms
 * @package Front_Base
 * @subpackage Form
 * @author Christian Soronellas <csoronellas@emagister.com>
 */
class Front_Base_Form_Horizontal extends Front_Base_Form
{
    public function __construct($options = null)
    {
        $this->_initializePrefixes();
        
        $this->setDisposition(self::DISPOSITION_HORIZONTAL);
        $arrLabel = array('Label', array('class' => 'inputLabel1'));
        if(isset($options['label_class']) && $options['label_class'] != '') {
            $arrLabel = array('Label', array('class' => $options['label_class']));
            unset($options['label_class']);
        }
        $this->setElementDecorators(array(
            array('FieldSize'),
            array('ViewHelper'),
            array('Addon'),
            array('ElementErrors'),
            array('Description', array('tag' => 'span', 'class' => 'help-block')),
            /*array('HtmlTag', array('tag' => 'div', 'class' => 'controls')),*/
            $arrLabel,
            /*array('Wrapper')*/
        ));
        
        parent::__construct($options);
    }
}
